Skip to content

Conversation

JanEricNitschke
Copy link
Contributor

@JanEricNitschke JanEricNitschke commented Sep 7, 2025

Previously there were no tests for the DictReader fieldnames setter, the case where a StopIteration was encountered when trying to determine the fieldnames from the content or the case where Sniffer could not find a delimiter.

Previously:

Name         Stmts   Miss Branch BrPart  Cover   Missing
--------------------------------------------------------
Lib/csv.py     262     10     96      8    95%   107->109, 164-165, 171, 255, 305->307, 312->314, 316-317, 327, 431, 434->443, 474, 511
--------------------------------------------------

After:

Name         Stmts   Miss Branch BrPart  Cover   Missing
--------------------------------------------------------
Lib/csv.py     262      5     96      6    97%   107->109, 305->307, 312->314, 316-317, 327, 434->443, 474, 511
--------------------------------------------------------
TOTAL          262      5     96      6    97%


This is my first attempt at contributing to CPython. I read through the dev guide. The easy issues (at least the recent ones i checked) seem to all already be assigned to someone and so i want the Increase test coverage.

Currently just going through modules alphabetically to check where i can see some fairly easy targets for increasing coverage. If there are any larger or more important modules i would love to have a look at those too if you could point me to them before i get to them in alphabetical order.

Previously there were no tests for the DictReader fieldnames
setter, the case where a StopIteration was encountered when trying
to determine the fieldnames from the content or the case where
Sniffer could not find a delimiter.
@python-cla-bot
Copy link

python-cla-bot bot commented Sep 7, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app
Copy link

bedevere-app bot commented Sep 7, 2025

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@bedevere-app bedevere-app bot added the tests Tests in the Lib/test dir label Sep 7, 2025
@JanEricNitschke
Copy link
Contributor Author

JanEricNitschke commented Sep 8, 2025

I had originally skipped adding a test for the "check > 20" line because i thought that might be an implementation detail we dont want to fix down, but after seeing this, i realized this is officially documented so i think it makes sense to add a test for it.

This now gets us to

Name         Stmts   Miss Branch BrPart  Cover   Missing
--------------------------------------------------------
Lib/csv.py     262      4     96      5    97%   107->109, 305->307, 312->314, 316-317, 327, 434->443, 511
--------------------------------------------------------
TOTAL          262      4     96      5    97%


@JanEricNitschke
Copy link
Contributor Author

I think the test failure is unrelated?

==> Fetching make
==> Downloading https://ghcr.io/v2/homebrew/core/make/blobs/sha256:94377dc5a364da305c75fd7aa923a42897993de9edd1eb074428e13c3f2aaf93
curl: (56) The requested URL returned error: 502
Error: make: Failed to download resource "make"
Download failed: https://ghcr.io/v2/homebrew/core/make/blobs/sha256:94377dc5a364da305c75fd7aa923a42897993de9edd1eb074428e13c3f2aaf93

@picnixz
Copy link
Member

picnixz commented Sep 8, 2025

Yes, don't worry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting merge skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants